<template>
  <div>BBB<button @click="add">按钮</button></div>
</template>

<script>
export default {
  name: "BComp",
  methods: {
    add() {
      this.$globalEventBus.$emit("add", 2);
    },
  },
};
</script>

<style>
</style>